<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="keywords" content="幸运大转盘" />
<meta name="description" content="幸运大转盘" />
<title>幸运大转盘</title>

<style>
	*{padding:0;margin:0}
	body{
		font-family:'MicroSoft Yahei',verdana,arial,tahoma;
		font-size: 14px;
		color: #fff;
		background: url(http://pic.yupoo.com/xq517/DZrK3BpL/isCRH.jpg) top no-repeat;
		height:2725px;
	}

	img {
		border: none;
		
	}
	

	
	a {
		color: #08c;
		text-decoration: none;
	}
	a:hover {
		text-decoration: underline;
	}
* li {
	list-style: none;
}
	.ly-plate{
		position:relative;
		width:450px;
		height:450px;
		margin: 0px auto;
	}
	.rotate-bg{
		width:450px;
		height:450px;
		background:url(<!--{~ini('settings.site_url')}-->/templates/xqw/images/ly-plate.png);
		position:absolute;
		top:750px;
		left:-240px;
	}
	.ly-plate div.lottery-star{
		width:214px;
		height:214px;
		position:absolute;
		top: 868px;
		left: -121px;
		
		outline:none
	}
	.ly-plate div.lottery-star img{

		cursor: pointer;

		
	}
	.zhongjiang{
		margin:0 auto;
		width:930px;
		height:500px;
		margin-top:1680px;
	}
.lin_scrollWrap{position:relative;height:500px;overflow:hidden; width:925px; } 
.lin_word{ width:925px; height:500px;padding-left:10px; position:absolute; left:0px; top:0px;} 
.lin_word li{height:24px; line-height:24px; overflow:hidden;text-align:center;}
</style>
<!--{~ui('loader')->js('jquery.min')}-->
<!--{~ui('loader')->js('@jQueryRotate')}-->
<!--{~ui('loader')->js('@jquery.easing.min')}-->
<!--{~ui('loader')->js('gaplessText')}-->
<!--{~ui('loader')->addon('dialog.art')}-->

{echo '<!-'.'-[if IE 6]>'}
<!--{~ui('loader')->js('DD_belatedPNG')}-->
<script type="text/javascript">
DD_belatedPNG.fix('.rotate-bg');
</script>
{echo '<![endif]-'.'->'}
<script type="text/javascript">
$(function(){ 
    $("#lotteryBtn").click(function(){ 
       lottery(); 
   }); 
}); 
function lottery(){ 
   $.ajax({ 
       type: 'POST', 
       url: '/lottery/choujiang', 
       dataType: 'json', 
       cache: false, 
       error: function(){ 
    	   $.dialog({icon: 'error',yesFn: true,content:'出错了！,请重试!'}); 
           return false; 
       }, 
       success:function(json){ 
    	   if(json.unlogin){
    		   $.dialog({
    			   icon: 'warning',
    			   content:'请先登录行骑网再来抽奖!',
    			   yesFn: true,
    			   close: function () {
    				   location.href="account/login";
    				   return true;
    			    }
    			   }); 
    		   
    		   return;
    	   }
    	   if(json.error){
    		   $.dialog({icon: 'error',yesFn: true,content:'出错了！,请重试!'}); 
    		  
    		   return;
    	   }
    	   if(json.zhongjiang){
    		   $.dialog({icon: 'warning',yesFn: true,content:'您已中奖了,不能再抽奖了'}); 
    		  
    		   return;
    	   }
    	   if(json.yichou){
    		   $.dialog({icon: 'warning',yesFn: true,content:'亲,每天只能抽一次奖哦!'}); 
    		   return;
    	   }
           $("#lotteryBtn").unbind('click').css("cursor","default"); 
           var a = json.angle; //角度 
           var p = json.prize; //奖项 
           var pid = json.pid
           $("#lotteryBtn").rotate({ 
               duration:3000, //转动时间 
               angle: 0, 
               animateTo:1800+a, //转动角度 
               easing: $.easing.easeOutSine, 
               callback: function(){ 
            	   if(pid==0){
            		   $.dialog({icon: 'succeed',yesFn: true,content:'没有中奖!别灰心,明天还有机会!'}); 
            	   }
            	   else{
            		   $.dialog({icon: 'succeed',yesFn: true,content:'恭喜你,您中了'+p+'! 您的名字会公布在下方的中奖名单里,等抽奖活动结束,我们客服会联系您!谢谢'}); 
            		   //location.href="/lottery";
            	   }
            	   $("#lotteryBtn").bind('click',function(){ 
            		   
            		    	$.dialog({icon: 'warning',yesFn: true,content:'亲,每天只能抽一次奖哦!'}); 
            		  
            		 }).css("cursor","pointer");
            	   
                  
               } 
           }); 
       } 
   }); 
} 
</script>
</head>


<body style="height:2725px;">
<div class="ly-plate">
		<div class="rotate-bg"></div>
		<div class="lottery-star" ><img src="templates/xqw/images/rotate-static.png" id="lotteryBtn"></div>
	</div>

<div class="zhongjiang">
<div class="lin_scrollWrap">
<ul class="lin_word" id="scroll_ul" style="top: 0px;">

{loop $prize_list $k $item}
<li style="opacity: 1;">
<span style="float:left;width:170px;overflow:hidden;text-align:left;padding-left:30px;">$item['user']</span>
<span style="float:left;width:450px;overflow:hidden;margin-left:30px;">
{if $item['prizeid']==1}
一等奖赛客电动车
{elseif $item['prizeid']==2}
二等奖赛客折叠自行车
{elseif $item['prizeid']==3}
三等奖行骑网纪念T恤
{/if}
</span>
<span style="float:left;width:200px;overflow:hidden;margin-left:30px;"><!--{echo date('Y-m-d H:i:s',$item['time'])}--></span></li>
{/loop}	
</ul>
</div>
</div>

<script>
//$("#scroll_ul").lin_gaplessText({effect:"yToTop"});

</script>	
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F44e2f9e50681d92fdbbc8f2608f2fca6' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>


</html>